Test Series - java script

Test Number 71/92

Q: Which of the following property gives access to the JavaScript memory usage data?
A. performance.memory
B. memory(performance)
C. performance(memory)
D. performance()
Solution: The property performance.memory gives access to the JavaScript memory usage data. It returns an object of type ObjectObject.
Q: What is the purpose of the timing property in the window.performance object?
A. Time of navigation event
B. Time of page load event
C. Time of navigation and page load event
D. Time of scrolling
Solution: Each performance.timing attribute shows the time of a navigation event (such as when the page was requested) or page load event (such as when the DOM began loading), measured in milliseconds. The legacy Performance.timing read-only property returns a PerformanceTiming object containing latency-related performance information.
Q: Which of the following property is associated with the Response event?
A. responseStart
B. responseEnd
C. both responseStart and responseEnd
D. responsiveStart
Solution: PerformanceTiming.responseStart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the UNIX epoch) when the browser received the first byte of the response from the server, cache, or local resource. The properties associated with the Response event are:
responseStart
responseEnd.
Q: Which of the following computation is correct to calculate the time taken for page load once the page is received from the server?
A. responseEnd-loadEventEnd
B. loadEventEnd-responseEnd
C. loadEventEnd/responseEnd
D. responseEnd/loadEventEnd
Solution: The legacy PerformanceTiming.loadEventEnd read-only property returns an unsigned long representing the moment, in milliseconds since the UNIX epoch, when the load event handler terminated, that is when the load event is completed. The time taken for page load once the page is received from the server: loadEventEnd-responseEnd.
Q: Which of the following property is associated with the Processing event?
A. domComplete
B. domContentLoaded
C. domInteractive
D. domload
Solution: PerformanceTiming.domComplete read-only property returns an unsigned long long representing the moment, in miliseconds since the UNIX epoch, when the parser finished its work on the main document. The following properties are associated with the Processing event:
domComplete
domContentLoaded
domInteractive
domLoading
unLoadEnd.
Q: What does it indicate when the type attribute of the navigation object is set to 2?
A. Navigation by moving back through history
B. Navigation by moving forward through history
C. Navigation by moving back & forward through history
D. Navigation by moving in favorites
Solution: The navigator object contains information about the browser. When the type attribute of the navigation object is set to 2, it means that the navigation is done by moving back or forward through history.
Q: What does the method Performance.now() return?
A. DOMTimeStamp
B. DOMHighResTimeStamp
C. DOMStamp
D. TimeStamp
Solution: The Performance.now() method returns a DOMHighResTimeStamp, measured in milliseconds, accurate to one thousandth of a millisecond equal to the number of milliseconds since the PerformanceTiming.navigationStart property and the call to the method. The returned value represents the time elapsed since the time origin.
Q: Which of the following is a read-only property?
A. PerformanceTiming.navigationStart
B. PerformanceTiming.fetchStart
C. PerformanceTiming.navigationStart & PerformanceTiming.fetchStart
D. PerformanceTiming.responseStart
Solution: PerformanceTiming.navigationStart read-only property returns an unsigned long long representing the moment, in miliseconds since the UNIX epoch, right after the prompt for unload terminates on the previous document in the same browsing context. If there is no previous document, this value will be the same as PerformanceTiming.fetchStart. Both PerformanceTiming.navigationStart and also the PerformanceTiming.fetchStart are a read-only properties.
Q: Which of the following is an interface?
A. Time
B. Timing
C. Performance
D. PerformanceTiming
Solution: Performance.timing read-only property returns a PerformanceTiming object containing latency-related performance information. PerformanceTiming is an interface in JavaScript.
Q: How many properties are associated with the Response event?
A. 1
B. 2
C. 3
D. 4
Solution: There are a total of 2 properties associated with the Response event namely:
PerformanceTiming.responseEnd
PerformanceTiming.responseStart.
PerformanceTiming.responseStart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the UNIX epoch) when the browser received the first byte of the response from the server, cache, or local resource.

You Have Score    /10